<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"> 
 
<head> 
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 
	<title>修改上月底码</title> 
	
	<link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/text.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/form.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/buttons.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/grid.css" type="text/css" media="screen" title="no title" />	
	<link rel="stylesheet" href="../css/layout.css" type="text/css" media="screen" title="no title" />	
	
	<link rel="stylesheet" href="../css/ui-darkness/jquery-ui-1.8.12.custom.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/jquery.visualize.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/facebox.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/uniform.default.css" type="text/css" media="screen" title="no title" />
	<link rel="stylesheet" href="../css/plugin/dataTables.css" type="text/css" media="screen" title="no title" />
	
	<link rel="stylesheet" href="../css/custom.css" type="text/css" media="screen" title="no title">
	<script src="../js/jquery/jquery-3.3.1.js"></script>
	<script src="../layui/layui.js" type="text/javascript" ></script>
	<script>
		var url =  new URLSearchParams(location.search);

		$(function(){
			$("#id").val(url.get("id"));
			$("#userno").val(url.get("userno"));
			$("#meterno").val(url.get("meterno"));
			$("#pervalue").val(url.get("pervalue"));
			$("#username").val(url.get("username"));
			$("#beforeMax").val(url.get("maxval"));
			$("#empname").val(url.get("empname"));
		})

		function submitthis(){
			$.ajax({
				type:"POST",
				url:"/rd-changevalue/updatepreVlaue",
				data:$("#f1").serialize(),
				success:function(data){
					parent.content.getReadafterupdate();
					var mylay = parent.layer.getFrameIndex(window.name);
					parent.layer.close(mylay);
				}

			})
		}
		function closethis(){
			var mylay = parent.layer.getFrameIndex(window.name);
			parent.layer.close(mylay);
		}
	</script>
	<script type="text/javascript">
		Date.prototype.Format = function (fmt) {
			var o = {
				"M+": this.getMonth() + 1, //月份
				"d+": this.getDate(), //日
				"H+": this.getHours(), //小时
				"m+": this.getMinutes(), //分
				"s+": this.getSeconds(), //秒
				"q+": Math.floor((this.getMonth() + 3) / 3), //季度
				"S": this.getMilliseconds() //毫秒
			};
			if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
			for (var k in o)
				if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
			return fmt;
		}
		$(function(){
			showtime();
		});

		function showtime(){
			var date=new Date();
			str= date.Format("yyyy年MM月dd日");
			$("#t1").val(str);
			//延迟执行一次
			window.setTimeout("showtime()",1000);
		}


	</script>

</head> 
 
<body> 

	<form id="f1" class="form label-inline uniform">
		<h2>修改上月底码</h2>
		<input name="rid" id="id" type="hidden">
		<div class="field"><label for="name">用户编码</label>
		<input size="50" name="UserNo"  style="background-color: lightgrey" readonly="readonly"  id="userno"  type="text" class="medium" value="0100000987"  /></div>
		
		<div class="field"><label for="name">表身码</label>
		<input size="50" id="meterno"  type="text" class="medium" value="02010631" disabled="disabled" /></div>
		
		<div class="field"><label for="name">用户姓名</label>
		<input size="50"  type="text" class="medium" value="张三"  /></div>
		
		<div class="field"><label for="name">修改前底码数</label>
		<input size="50"  style="background-color: lightgrey" readonly="readonly" name="PreValue1" id="pervalue" type="text" class="medium"  /></div>
		
		<div class="field"><label for="name">修改后底码数</label>
		<input size="50" name="PreValue2" type="text" class="medium" value="" /></div>
		
		<div class="field"><label for="name">操作人</label>
		<input size="50" type="text" id="empname" class="medium" value="马云" disabled="disabled" /></div>
		
		<div class="field"><label for="name">操作日期</label>
		<input size="50" id="t1" type="text" class="medium" value="2013年11月19日" disabled="disabled" /></div>
		
		<div class="field"><label for="name">操作原因</label>
		<input size="50" name="Remark" type="text" class="medium" value="" /></div>
	
		<div class="buttonrow">
			<input type="button" onclick="submitthis()" class="btn" value="确定"></input>
			<button class="btn btn-grey" onClick="closethis">关闭</button>
		</div>
	
	</form>

<script src="../js/jquery/jquery-1.5.2.min.js"></script>
<script src="../js/jquery/jquery-ui-1.8.12.custom.min.js"></script>
<script src="../js/misc/excanvas.min.js"></script>
<script src="../js/jquery/facebox.js"></script>
<script src="../js/jquery/jquery.visualize.js"></script>
<script src="../js/jquery/jquery.dataTables.min.js"></script>
<script src="../js/jquery/jquery.tablesorter.min.js"></script>
<script src="../js/jquery/jquery.uniform.min.js"></script>
<script src="../js/jquery/jquery.placeholder.min.js"></script>

<script src="../js/widgets.js"></script>
<script src="../js/dashboard.js"></script>

<script type="text/javascript">
	
$(document).ready ( function () 
{
	Dashboard.init ();		
});

</script>

</body> 
 
</html>